var deg = 6;
//DOM对象选择器
var hr = document.querySelector(".hr");
var mn = document.querySelector(".mn");
var sc = document.querySelector(".sc");
 
function mytime(){
	var date = new Date();
	//一周共360度,12个小时
	//0-23
	var hh = date.getHours()*30;
	//0-59
	var mm = date.getMinutes()*6;
	//0-59
	var ss = date.getSeconds()*6;
	//mm/12 每12分钟,时针偏移6度,共30度,走完1个小时
	hr.style.transform = 'rotate('+(hh+mm/12)+'deg)';
	mn.style.transform = 'rotate('+mm+'deg)';
	sc.style.transform = 'rotate('+ss+'deg)'; 
}
//默认时间1000毫秒
setInterval('mytime()');